<!doctype html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>A bug of getXY method of YUI</title>
	</head>
	<body>
		<div style="height:800px;">&nbsp;</div>
		<div style="position:fixed;top:100px;left:100px;height:100px;width:100px;background-color:red;"><a id="test" style="background-color:yellow;" href="http://www.quchao.com/entry/A-bug-of-getXY-method-of-YUI/">Chappell</a></div>
		<div id="anchor" style="position:absolute;top:0;left:0;background-color:green;">&nbsp;</div>
		<div style="height:800px;">&nbsp;</div>

		<!-- Dependencies -->
		<script src="http://yui.yahooapis.com/2.8.0r4/build/yahoo/yahoo-min.js"></script>

		<!-- YUI 2 -->
		<script src="./yui2-dom-fixed.js"></script>

		<!-- Test -->
		<script>
			var YUD = YAHOO.util.Dom;
			setTimeout(function () {
				YUD.setXY('anchor', YUD.getXY('test'))
			}, 1000);
			setTimeout(function () {
				window.scrollTo(0, 100);
			}, 2000);
			setTimeout(function () {
				YUD.setXY('anchor', YUD.getXY('test'))
			}, 3000);
		</script>

	</body>
</html>
